procedure search(v:longint); {ALL edges; amount of vertex of odd degree = 0} {A - Matrix; Cv - stack; yk1 - pointer}
var j:longint;
begin
for j:=1 to n do begin
  if a[v][j]<>0 then begin
    a[v][j]:=0;
    a[j][v]:=0;
    search(j);
  end;
end;
inc(yk1);
cv[yk1]:=v;
end;